<template>
	<view class="mainPage" :style="{'padding-top': `${$store.state.safeArea.top || 0}px`, 'padding-bottom': `${$store.state.safeArea.bottom || 0}px`}">
		<public-head :title="title"></public-head>
		<view class="box">
			<view class="box1">
				<!-- <view class="name">医嘱</view> -->
				<view class="bianhao-box">
					<view class="bianhao">
						NO：{{yizhuData.pre_number}}
					</view>
					<view class="time">
						{{yizhuData.start_time}}
					</view>
				</view>
				<view class="list">
					<view class="item">
						宠物名字： <text>{{yizhuData.petname}}</text>
					</view>
					<view class="item">
						种族： <text>{{['其他', '猫', '狗'][yizhuData.race] || yizhuData.race}}</text>
					</view>
					<view class="item">
						年龄： <text>{{yizhuData.age}}</text>
					</view>
					<view class="item">
						性别： <text v-if="yizhuData.sex==0">母</text><text v-else>公</text>
					</view>
					<view class="item">
						体重： <text>{{yizhuData.weight}}kg</text>
					</view>
				</view>
			</view>
			
			<view class="box2">
				<view class="title">
					<text>诊断结果：</text>
					<input type="text" v-model.trim="yizhuData.pets_result" value="" disabled placeholder="请输入诊断结果" placeholder-style="font-size: 28rpx;color: #959595;" />
				</view>
				<view class="jianyi-box">
					<view class="zhenduan">诊断建议：</view>
					<view class="textarea-box">
						<textarea value="" v-model.trim="yizhuData.proposal" disabled  placeholder="请输入诊断建议" placeholder-style="color: #959595;font-size: 26rpx;" />
					</view>
				</view>
			</view>
		</view>
	
	</view>
</template>

<script>
	var that
	import publicHead from "@/components/publicHead/publicHead.vue"
	export default {
		components: {
			publicHead
		},
		data() {
			return {
				title: '医嘱',
				show: false,
				diagnosis:"" ,//诊断结果
				diagnosticAdvice:"",  //诊断建议
				yizhuData:"",  
			}
		},
		onLoad(options) {
			that=this
			let id = options.id
			that.postData(id)
		},
		methods: {
			postData(id){
				that.$postAjax1('Doctorsside_prescriptionorders_info',{
					order_sn:id
				},function(data){  //https://ask.suoweilai.com/Doctorsside_blockmedical_advice  医生端接诊 - 接诊-点击开医嘱或处方页面数据显示
					that.yizhuData=data.data.data
					// console.log(data.data.data,99999999999)
				})
			},
			
		}
	}
</script>

<style scoped lang="scss">
.box{
	padding-top: 16rpx;
	padding-bottom: 200rpx;
	.box1{
		width: 100%;
		padding: 0 32rpx;
		background: #FFFFFF;
		margin-bottom: 16rpx;
		.name{
			text-align: center;
			padding: 32rpx 0 14rpx;
		}
		.bianhao-box {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 12rpx 0;
			border-bottom: 2rpx solid rgba(0,0,0,0.08);
			.bianhao{
				font-size: 26rpx;
				font-weight: 400;
				color: #A3A3A3;
				line-height: 36rpx;
			}
			.time{
				font-size: 24rpx;
				font-weight: 400;
				color: #A3A3A3;
			}
		}
		.list{
			display: flex;
			justify-content: space-between;
			flex-wrap: wrap;
			padding-top: 22rpx;
			.item{
				font-size: 28rpx;
				font-weight: 400;
				color: #959595;
				line-height: 40rpx;
				width: 60%;
				margin-bottom: 28rpx;
				text{
					margin-left: 6rpx;
					font-size: 26rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #242424;
					line-height: 36rpx;
				}
				&:nth-of-type(2n){
					width: 40%;
				}
			}
		}
	}
	
	.box2{
		width: 100%;
		padding: 0 32rpx;
		background: #FFFFFF;
		.title{
			margin-bottom: 68rpx;
			padding:  22rpx 0;
			border-bottom: 2rpx solid rgba(0,0,0,0.08);
			text{
				font-size: 28rpx;
				font-weight: 500;
				color: #242424;
				line-height: 40rpx;
				vertical-align: middle;
			}
			input{
				display: inline-block;
				font-size: 28rpx;
				font-weight: 400;
				color: #959595;
				line-height: 40rpx;
				vertical-align: middle;
			}
		}
		.jianyi-box{
			.zhenduan{
				font-size: 28rpx;
				font-weight: 500;
				color: #242424;
				line-height: 40rpx;
				margin-bottom: 20rpx;
			}
			.textarea-box{
				textarea{
					box-sizing: border-box;
					height: 300rpx;
					width: 100%;
					font-size: 26rpx;
					font-weight: 400;
					color: #959595;
					padding: 0 28rpx;
					color: #343434;
					line-height: 40rpx;
				}
			}
		}
	}
}
</style>


